����� ������, ����� ������������� ����������� ���������� ������� ���������� �����: ��������� ��������� ����, ���������� ��������������� ���� �������, ������� ���������� ����������� �� ���������� ������, ���������� ���� � �.�. ��������� ���� ������ ����������� � ��������� ���������, �������������� ������ RTF (rich text format) ����� Microsoft. ����������� ����������� ��������� ���������� ������������ ���� ������.
������� ������ Windows �����
�������� � ���� ���� � ��������������� ����������. (��� ������ � Windows
95 ����� ������������ ������� �������������� ������� ����.) �������� ����
�������� ����� ������, ��� Search, ������� ������� ������ �������� ����
� ��������� ������������ ������������ �� ������, ����� ������ ����� �������������
��� �����. �����, ��� ������ ��������� ����� ����� ����� ������� � �������
�������. ����� ��������� ����� ���������� (��� � � Visual Basic) �����
��������� ����������-��������� ���������. ���� ������ ��������� ���������
�������� ��� ������� ������� F 1 (��� ��� ������ ������ WhatsThisHelp �
����� Windows 95) � ������ ���������� � ��� ����������� �����, �������
������������ � ��������� ������.
�������� ������������ �������� ���������� �������
������� ��������� ��� ��������
���������� ������� �������� ����������� ������ ������������ �������� ������.
� ������ ��� ������ ���� �������� ������ (�� ����� ������ - ���� �������)
��� ������, ������������ ����� ��������� �������������. ������ ������������
������� ������������ � ���� ������������� �������. ��� ��������� ������������
����� ������������ �� ����� ��� � ����� �������������. ��� �� ����� ������
������ ������ ��������� ����������� ���������� ������ ��� �������� � ������
����� ��� ������������� ����������� �� ����� ������� ������� ��������.
���� ����������� ������������
������ ������������ �������� � ������ �����������, ��������� ��� ����������
������� �� ������. � ���� ������� ����� ���������� ������������� ��������
����������� ��� �������������� ���� � ���������� �������.
�������� ������� ������������ ��������
����������� ��� ����� (�� ������
�����������), ������� ��� �������� ���������� ������� �� ������������ ��
������� ������, ���������� �� �����������������, ��� ����������� �����������
�������� RTF. ��������� �������� ����� ����� ����� ������ � ���, ��� ���������
��� ��� ���� ������������� ������� RTF, ������� ������ ����� ���������
��� ������. � �������� ������� ����� �������� ������� ��� ������ ������������
������ RoboHelp, ������ ������ � ��������� �� ��� ������������.
� ����� ������, ��� �� ����
��� ���������� �����, ��������� ��������� ��������, �������������� ������
RTF (rich text format) ��� ���������� �����, ������� ����� ������������
���������������� ������������ � ���������� �������. (��� ������� � ���,
��� ����������� ��������� ������������ ���� RoboHelp �������� � ��������
�������������� ������� � ��������� Microsoft Word, �������, ��� ��������,
��������� ������������ ������������ RTF-�������.)
������ ������������ ������
���������� ������� ������ ���� ������� �� ������� �������� "������ ��������"
(hard page break). (���� ������ ���� ������� ��������������, � �������
�� ������ �������� �������, ������� �������� �������� ����������� �������������.
������ "������ ��������" ����� ������ ����� ������� ���������� ������ CTRL+ENTER
� ��������� ���������� ����� Microsoft.) ������ ������������ ������ ������
��������� ������������� ����������� ������, ��������, � ����� ������ ���������
�������� ����. ����������� ������ ������������ ��� �������� � �������,
�������������, ������ ������ ������ ����� ���������� ������. �������� �����
������������ ��� ����������� ������������ ������ � ���������� �������.
�����������, ��������� ������������ �������� ���� � ����� ���������� ��������
�����.
�������� �� �������� ������,
������������ ��������������, �������� ������� ��� ���������� ����������
�������. ��������, ����������� ������ ���������� ��� ������ ��������������
�������� "#". ����������� ������ ����� ������������ ������� �� � �� Z,
�����, ����� � ������� �������������. ������������ ����� ������ ����������
255 ���������.
�������� ������������� �������
���������� ��� ������ �������������� �������� "$" (���� �������). ��������
����� ��������� �� 127 �������� �� ������������ ������ ������� Windows.
�, �������, �������� ����� ���������� ��� ������ �������������� ��������
"�" (� ������� ��������).
(�������� ����� �� ��������
�������������, ������ ����� ��������� ������������� ������� ����� ��� ����
�������� �����, ���������� �� � ������, ����������� ������� ";". ��������
����� ����� ��������� ������������ ������� �� ������������ ������ ��������
������� Windows. ������������ ����� ��������� ����� �� ������ ���������
255 ��������.)
����� �������, ��� ����� ������������
������ �� ���� � ��������� ������������.bmp, ������ ��� ��� � ��������
�������. ��� ���� ��������� ����������� ����� �������� � ���������������
����� ������ ������. ����� ����� ��������� ��������� ����������� �� ��������
�� ������� ������������ ��������. ���� ��� �������� ���������� �������
������������ ��������� �������� Word for Windows, �� ���� �� ����������
����� �������, ���������������� �������� Insert Picture. (��� ������� �����������
�������� ������� ������� ��������������� ������� ������� "By Reference".)
����������� ����� ���������� ������� ����� ����� �������������� � ��������
����� �������� � ������ �����. ���� �� ������������ �������� Word for Windows,
�� ������� ������� ������ �� ��������� ����������� � ����� ������������
��������.
������� ��������, ��� ���������
��������� ������ (��������, "Status Area") ����������� ������� ������.
����� ��������� ������������ � �������� ����� �������� � ������ ��������.
����� �� ������ ����� ���������� ������� �����, ����������� ����� ��������
(���� ����� �� ��������� �� ����� � ���������� �������). ����� ���������
��������� ��������� ������ ����� ���� ������� ���:
JumpString CONTEXT_SroWG
��� ����������� ������, ����������� ����� ������,
������ ���� ��������������� ��� ������� ����� ��� ��������. ����� ��� ��
����� ���������� ������� ����������� ������ ����� ��������� ������, �������������
��������� ������, ��� �������� �������������� ����������� �������.
�������� ����������-��������� ���������� �������.
��������, ����������� �� ���� ���������� �������, �������� ������� ��������� ������ ������� ���� ��� (application). ��� ���� ����� ������� ��� �������� � ��������������� �������, ���������� ��������� ���������:
�������� � ���������� ����� �������
���� ������� ���������� �������
�������� ��� ����������, ����������� ��� ���������� ������ �����������.
����� �����, �� �������� ������� (�����) ������������ ��� ������������
������ ����� ����������� ������� � ����������� ������� ID, ������� �����
�������������� � ������� (��� ��� ��������, ��� ������ ������������ �������
������������ ����� �����������, ������������ � ����� ������� ����������
�������, � ����� ����������).
���� ������� ���������� �������
������������ ����� ������� ����� � ������� ASCII. � �������� ����������
��� ���� �������� ������ ������� ������������.hpj. ���� ������� ����������
������� �������� ������ ���� ������ � ������������� ���������, � �����
����� ��������� ��������� ����������� ��� ������� ������������ ����� ������������
�������� � ������������ �������� ID. ����� ����� ��������� ��� �����������
������ ������ � ���� �� ������������� �������, ������������� ���� �������.
��� ������������ ������������
����� ����������� ������� ID � ������������ ������������ �������� ����������
������� ��� ������� ����� ��������� ����� [MAP], ����� ���� ����� ������
(�.�. ����� ������� ������� SPACE ��� TAB) ������� ������� �����������
����� �������. ��������, ������ [���]-����� ������� ���������� �������
����� ��������� ��������� ����������:
[MAP]
FILE_MENU 5 ;5 is the context
number
;Comments follow semicolons
EDIT_MENU 10 ;10 is context
number
VIEW_MENU 15 ;15 is context
number
������, ���� ������� ����������
�������� ���������� ������� �� ��������� HelpContextID, ������������� �
5, ������� ����� ������ ��� ������������� ������� FILE_MENU; ���������
HelpContextID � 10 � ������ ���������� �������� ���������� �������, �������
����� EDIT MENU � �.�.
����� �������� ����� �������
���������� ������� �������� ������ ������� ���������� ������� ������. (�������,
��� ����������, � ������� ��������� ����������, ������ ����������� � ���������
���������� PATH, � ��������� ������ ���������� ����� ������� ������ ����.)
��������, � ������� Windws 95 ����� ������������ ��� ����� ���������� ������
Run, ��������� �� ���� Start, � ������� ����� �������� ����� ��������:
C:\VB\HC\HC Named fHelpPi-ojectFile
���� ���������� ��������� � ����������� �� ��������� ���������� (��� ������ Professional). ��� �� ����� ��������:
�� NameOfHelpProjectFile
� IUM ������, ����� ����������, ���������� ����������,
���������� � ���������� PATH.
���������� ���������� �������
����� ������� ���������� ������������, �� ��������������� �����. ��������,
����� ������������� ������ ������������ ����� ����� ��� ��������� ���������
� ����� ��� ����. ����� �����, ����� ������������ ��� ���� ����������������,
���������� ������ Microsoft, ��� ���������� ������������ ����������� ����������
�������. ��� � ������ ���������� ���������� � Visual Basic Books Online.
����� ����� ���������� ������� ���������� ����������, ����������� ������
���������� ����� Iconwrks.rtf.
������ � ���������� ������� Windows
��� ������� � ���������� ������� ����� ������������ ����� ShowHelp ������� ���������� ������. ����� ��������� ������������������ ��������, ������� ���������� ��� ����� ���������:
Declare
Function WinHeip Lib "user32" Alias "WinHelpA" (ByVal hHnd As Long, ByVal
IpHclpFu
As
String, ByVal wCommand As Long, ByVal dwData As Long) As Long
�������� hWnd ("window's handle) �������� ���������� �������� hWnd ������� �����. �������� IpHelpF ��������� ���� � ����� ������� (���� ���� ��������� � ����������, �������� �� ���������� .���-������). ��� ������������ ��������� ���������, ������������ ���������� wCommand:
Global
Const HELP CONTEXT = &H1
'Display topic by id number
Global
Const HELP QUIT -- &H2
'Terminate help
Global
Const HELP INDEX = &H3
'Display index
Global
Const HELP HELPONHELP = &H4 'Display help on using help
Global
Const HELP SETINDEX = &H5 'Set an alternate Index
Global
Const HELP KEY = &H101
'Display topic for keyword in Data
Global
Const HELP MULTIKEY = &H201 'Look up keyword in alternate table
��������, ��� ����, ����� ������� ����������� ���������� ������� "Help on Help", ���������� ���������� ��������� ���������:
Public Sub DisplayHelp On Help(X
As Form)
Dim
Foo As Long ' dummy variable
Foo
= WinHeip(X.hWnd,"C:\WINDOWS\HELP\WINDOWS.HLP",
HELP
HELPONHELP,CLng(O))
End Sub
����� ����� ����� ������ ����
DisplayHelp_On_Help_Me
����� �������� ����������� ���������� ������� Windows.
���� ��� ������ ���������� ������� ������������ WinHeip API, �� ��� ���� ����� ������� �������������� ���� �������, ��� ����� ����� ������� ������� WinHeip API (�.�. ���������� ������� Windows �������� ��������� �����������). ��� ����� ������� ��������� ������� (������ ��� ����� ������������ ������� Form Unload). ���������� Foo � Bar ������ ����� ���������� ���, ���� ������� ��� �� ����� ������� �������� ��������.
Sub Form_Unload(Cancel As Integer)
Dim Foo As Integer, Bar As String 'dummy variables
Foo = WinHeip(Me.hWnd, Bar, Help_Quit, CLng(O))
End Sub
���������� ������� What's This
������������ ������� Windows 95 ����� ����� ��� ����������-��������� ���������, ������� ���������� ������� ����� ��� ������������ ���������� ��������������� �����, �������������� �� ��������� �������� �����. ��� ���� ��������� ���� �������� ���� ������� ��� �� �������������� ����, ����� ���� ������������ ����� �������� ������ �� ������ �������. � ���������� ���� �������� �� ����� ��������� ����������-��������� ���������� � ��������� �������. ����� ��� ��, ��� � � ������ ��������� ����������-��������� ���������, ��� ���������� ������ ��������� "What's This" ���� ���������� ������������ ����� ����������� � ������� MAP � ����� ������� ���������� �������.
��� ����������� ����������-��������� ��������� What's This � ���������� �������� ��� �������. �� � ����� ������ �������� WhatsThisHelp ������ ���� ����������� � True.